package com.schoolCommunity.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@MapperScan("com.schoolCommunity.mapper") //扫描Mapper包  //扫描Mapper文件夹
@Configuration  //声明配置类
@EnableTransactionManagement
public class MyBatisPlusConfig {

    @Bean  //配置分页插件
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
